package com.share.homestay.interfaces;

import com.share.homestay.entity.OrderLogs;
import com.share.homestay.entity.SysUser;
import com.share.homestay.entity.TjPermissions;
import com.share.homestay.pojo.JsonResult;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

public interface SysUserServiceApi {
    @RequestMapping("sysUserPageQuery")
    JsonResult sysUserPageQuery(@RequestBody SysUser sysUser, @RequestParam(value = "pageNum",defaultValue = "1") Integer pageNum,@RequestParam(value = "pageSize",defaultValue = "100") Integer pageSize);

    @RequestMapping("getUserByUsername")
    SysUser getUserByUsername(@RequestParam("username") String username);
    @RequestMapping("selectPermsByUserId")
    List<TjPermissions> selectPermsByUserId(@RequestParam("userId") Long userId);

    @RequestMapping("addOrderLogs")
    void addOrderLogs(@RequestBody OrderLogs orderLogs);

    @RequestMapping("selectLogs")
    JsonResult selectLogs(@RequestBody OrderLogs orderLogs,@RequestParam(value = "pageNum",defaultValue = "1")Integer pageNum,@RequestParam(value = "pageSize",defaultValue = "100")Integer pageSize);
    @RequestMapping("findAllUser")
    List<SysUser> findAllUser();
}
